package com.jaws.core.mvc.interceptor;

import org.slf4j.MDC;

import com.jaws.core.common.log.LogConst;

import feign.RequestInterceptor;
import feign.RequestTemplate;

/**
 * trace功能
 * @author liangqm
 * @date 2018-05-14 19:37:17
 * @since v1.0.2
 */
public class JawsFeignInterceptor implements RequestInterceptor {

	@Override
	public void apply(RequestTemplate requestTemplate) {
		String uuid = MDC.get(LogConst.UUID);
		requestTemplate.header(LogConst.TRACE_ID, uuid);
	}

}